<div class="shop-address-list">
    <ul>
        <li s-for="item,i in list">
            <div>
                <div class="adr-title">
                    <span class="adr-default" s-if="item.is_default">默认</span> <span>{{item.address}} {{item.street}}</span> 
                </div>
                <div class="adr-info mt-2">
                    {{item.contactor_name}} {{item.phone}}
                </div>
            </div>
            <div class="adr-right">
                <span class="pointer far fa-edit btn-edit" title="编辑" on-click="edit(item)"></span>
                <span class="pointer ml-2 btn-del far fa-trash-alt" on-click="delete(item)" title="删除"></span>
            </div>
        </li>
    </ul>
    <div s-if="list.length == 0" class="text-center text-sm text-muted pt-5 pb-5">
        没有数据
    </div>
    <div class="text-center mt-3">
        <button class="btn btn-danger pr-5 pl-5" on-click="handleAdd">新增</button>
    </div>
    <div class="modal fade" id="{{m_id}}" tabindex="-1">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-title text-center">编辑地址</div>
                <div class="modal-body">
                    <div class="form form-horizontal">
                        <div class="form-group row">
                            <label class="col-md-3 col-form-label">姓名：</label>
                            <div class="col-md-8">
                                <input type="text" class="form-control" value="{=form.contactor_name=}">
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-md-3 col-form-label">联系电话：</label>
                            <div class="col-md-8">
                                <input type="text" class="form-control" value="{=form.phone=}">
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-md-3 col-form-label">地址：</label>
                            <div class="col-md-8">
                                <div>
                                    <select class="form-control" style="width: 32%;display: inline-block;" value="{=currentProvince=}" on-change="changeProvinceChildren">
                                        <option value="{{i}}" s-for="v,i in provinceList">{{v.shortname}}</option>
                                    </select>
                                    <select class="form-control" style="width: 32%;display: inline-block;" value="{=currentCity=}" on-change="changeCityChildren">
                                        <option value="{{i}}" s-for="v,i in cityList">{{v.shortname}}</option>
                                    </select>
                                    <select class="form-control" style="width: 32%;display: inline-block;" value="{=currentArea=}">
                                        <option value="{{i}}" s-for="v,i in areaList">{{v.shortname}}</option>
                                    </select>

                                </div>
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-md-3 col-form-label">街道：</label>
                            <div class="col-md-8">
                                <input type="text" class="form-control" value="{=form.street=}">
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-md-3 col-form-label">设为默认：</label>
                            <div class="col-md-8">
                                <select value="{=form.is_default=}" class="form-control">
                                    <option value="1">是</option>
                                    <option value="0">否</option>
                                </select>
                            </div>
                        </div>
                        <div class="text-right">
                            <button class="btn btn-danger" on-click="submit">提交</button>
                            <button class="btn" on-click="modal('hide')">取消</button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>